let arr = [
  { username: "tom", password: "123456", nickname: "汤姆" },
  { username: "jerry", password: "abcdef", nickname: "杰瑞" },
  { username: "Lucy", password: "aabbcc", nickname: "路西" },
];
let table = document.querySelector("table");
for (const p of arr) {
  let tr = document.createElement("tr");
  let usernameTd = document.createElement("td");
  let passwordTd = document.createElement("td");
  let nicknameTd = document.createElement("td");
  usernameTd.innerText = p.username;
  passwordTd.innerText = p.password;
  nicknameTd.innerText = p.nickname;
  tr.append(usernameTd, passwordTd, nicknameTd);
  table.append(tr);
}
